//
//  TSRecieveMsgListViewController.m
//  chart
//
//  Created by xu on 15/7/26.
//  Copyright (c) 2015年 xu. All rights reserved.
//

#import "TSRecieveMsgListViewController.h"
#import "TSRecieveMsgTableView.h"
#import "TSHomeViewController.h"
#import "TSColor.h"

@implementation TSRecieveMsgListViewController{
    TSRecieveMsgTableView *tableView;
    TSReceiveMsgListModel *msgListModel;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(shoHomeViewController:) name:TSNotification_HasLogined object:nil];
    self.navigationItem.title = @"接收列表";
    tableView = [[TSRecieveMsgTableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
    tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    [self.view addSubview:tableView];
    
    msgListModel = [[TSReceiveMsgListModel alloc] init];
    [tableView.header beginRefreshing];
}

- (void)shoHomeViewController:(NSNotification *)noti
{
    TSHomeViewController *home_vc = [[TSHomeViewController alloc] init];
    TSBaseNavigationController *nav_vc = [[TSBaseNavigationController alloc] initWithRootViewController:home_vc];
    [self presentViewController:nav_vc animated:YES completion:nil];
}

- (void)dealloc
{
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}


@end
